
type optionItem = {
  option_key: string;
  option_desc: string;
}

export const inputTypes: optionItem[] = generateListOptions([
  'text',
  'password',
  'textarea',
  'url',
  'email',
  'date',
  'number',
  'tel'
])

export const sizes: optionItem[] = generateListOptions(['small', 'default', 'large'])

export const placements: optionItem[] = generateListOptions([
  'top',
  'top-start',
  'top-end',
  'bottom',
  'bottom-start',
  'bottom-end'
])

export const buttonTypes: optionItem[] = generateListOptions([
  'default',
  'primary',
  'dashed',
  'info',
  'text',
  'success',
  'warning',
  'error'
])

export const dateTypes: optionItem[] = generateListOptions([
  'date',
  'daterange',
  'datetime',
  'datetimerange',
  'year',
  'month'
])

export const timeTypes: optionItem[] = generateListOptions([
  'time',
  'timerange'
])

export const noLabelComps = ['eButton']

function generateListOptions(arr: string[]): optionItem[] {
  return arr.map(item => {
    return {
      option_key: item,
      option_desc: item
    }
  })
}

export default {}